﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lanbt.Core.Entity.Dto.lanbt_user
{
    public class QueryUsersOutput
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string? Mobile { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }

        /// <summary>
        /// 是否是超级管理员
        /// </summary>
        public bool IsAdmin { get; set; } = false;

        /// <summary>
        /// 角色ids
        /// </summary>
        public string? RoleIds { get; set; }

        /// <summary>
        /// 角色ID集合
        /// </summary>
        public List<string> RoleIdList
        {
            get
            {
                if (!string.IsNullOrEmpty(RoleIds))
                {
                    string[] roles = RoleIds.Split(',');
                    return roles.ToList();
                }
                return new List<string>();
            }
        }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleNames { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人ID
        /// </summary>
        public string? CreatedId { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ModificaTime { get; set; }

        /// <summary>
        /// 修改人ID
        /// </summary>
        public string? ModifiedId { get; set; }
    }
}
